package com.ate.adapters;

import android.widget.ImageView;

import androidx.annotation.Nullable;

import com.ate.javamvp.R;
import com.ate.bean.SearchBean;
import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

/**
 * @author Ate
 * @description:
 * @date :2020/12/18 16:27
 */
public class ClassRightRecyAdapter extends BaseQuickAdapter<SearchBean.DataBean, BaseViewHolder> {
    public ClassRightRecyAdapter(int layoutResId, @Nullable List<SearchBean.DataBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, SearchBean.DataBean item) {
        helper.setText(R.id.classright_tv,item.getCategoryName());
        Glide.with(mContext).load(item.getPictUrl()).into((ImageView) helper.getView(R.id.classright_img));
    }
}
